<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // //2 
        // process.nextTick(() => { console.log(111); });
        // const promise = new Promise(resolve => {
        //     console.log(222);
        //     resolve();
        // });
        // setTimeout(() => { console.log(333); }, 0);
        // promise.then(() => { console.log(444); });
        // setImmediate(() => { console.log(666); });
        // 1 2 19 3 5 4 20 9 10 11 17 13 12 6 7 16  8  15 14

        

    </script>
</body>

</html>